package com.vipheyue.lanjingapp.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.vipheyue.lanjingapp.R;

import java.util.ArrayList;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class JobWelfareListActivity extends Activity {

    @Bind(R.id.iv_Menu_leftImg)
    ImageView iv_Menu_leftImg;
    @Bind(R.id.tv_Menu_leftTitle)
    TextView tv_Menu_leftTitle;
    @Bind(R.id.rl_menu_left)
    RelativeLayout rl_menu_left;
    @Bind(R.id.tv_Menu_Title)
    TextView tv_Menu_Title;
    @Bind(R.id.iv_menu_rightTitle)
    TextView iv_menu_rightTitle;
    @Bind(R.id.iv_menu_right)
    ImageView iv_menu_right;
    @Bind(R.id.rl_menu_right)
    RelativeLayout rl_menu_right;
    @Bind(R.id.check1)
    CheckBox check1;
    @Bind(R.id.check2)
    CheckBox check2;
    @Bind(R.id.check3)
    CheckBox check3;
    @Bind(R.id.check4)
    CheckBox check4;
    @Bind(R.id.check5)
    CheckBox check5;
    @Bind(R.id.check6)
    CheckBox check6;
    @Bind(R.id.bt_search)
    Button bt_search;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_job_welfare_list);
        ButterKnife.bind(this);
        tv_Menu_Title.setText("福利");

    }
    @OnClick({R.id.rl_menu_left, R.id.bt_search})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.rl_menu_left:
                finish();
                break;
            case R.id.bt_search:
                ArrayList search_jobWelfare_list = new ArrayList<String>();
                if (check1.isChecked()) {
                    search_jobWelfare_list.add("五险一金");
                }
                if (check2.isChecked()) {
                    search_jobWelfare_list.add("周末双休");
                }
                if (check3.isChecked()) {
                    search_jobWelfare_list.add("长白班");
                }
                if (check4.isChecked()) {
                    search_jobWelfare_list.add("包吃包住");
                }
                if (check5.isChecked()) {
                    search_jobWelfare_list.add("奖励计划");
                }
                if (check6.isChecked()) {
                    search_jobWelfare_list.add("公积金");
                }
                Intent intent = getIntent();
                intent.putStringArrayListExtra("search_jobWelfare_list", search_jobWelfare_list);
                setResult(RESULT_OK,intent);
                finish();
                break;
        }
    }
}
